<template>
  <div>
    <div style="width: 300px;padding-left: 10px;display: flex;height: 40px;">
      <el-divider content-position="left"><span class="title-divider">标签</span></el-divider>
      <i class="el-icon-plus label-add" @click="labelAddHandler"></i>
    </div>

    <el-dialog
        title="新增标签"
        modal
        :visible.sync="dialogVisible"
        width="40%"
        :before-close="closeHandler">
      <el-form inline>
        <el-form-item label="标签名称: ">
          <el-input size="mini" v-model="labelForm.name"></el-input>
        </el-form-item>

        <el-table size="mini" border>
          <el-table-column prop="propName" label="属性名称"></el-table-column>
          <el-table-column prop="propValue" label="属性值"></el-table-column>
        </el-table>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button size="mini" @click="dialogVisible = false">取 消</el-button>
        <el-button size="mini" type="primary" @click="dialogVisible = false">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: "Database",
  data() {
    return {
      dialogVisible: false,
      labelForm: {
        name: "",

      }
    }
  },
  methods: {
    labelAddHandler() {
      this.dialogVisible = true;
    },
    closeHandler() {
      this.dialogVisible = false;
    }
  }
}
</script>

<style scoped>
.title-divider {
  color: #528ff2;
  font-family: 微软雅黑, serif;
}

.label-add {
  line-height: 50px;
  margin-left: 5px;
  cursor: pointer;
  color: #528ff2;
}

/deep/ .el-dialog__body {
 padding: 0 20px;
}
</style>